package cn.dubnation.base.exception;

import cn.dubnation.base.enums.ResponseCode;

/**
 * 业务类的异常，系统已知的异常
 */
public class BusinessException extends RuntimeException{

    /**
     * 异常信息枚举
     */
    private ResponseCode responseCode;

    public BusinessException() {
        super();
    }

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(String message, Throwable cause) {
        super(message, cause);
    }

    public BusinessException(Throwable cause) {
        super(cause);
    }

    public BusinessException(ResponseCode responseCode) {
        this.responseCode = responseCode;
    }

    public ResponseCode getResponseCode() {
        return responseCode;
    }

    public void setResponseCode(ResponseCode responseCode) {
        this.responseCode = responseCode;
    }
}